#ifndef PARALLELSEARCHER_H
#define PARALLELSEARCHER_H

#include <QRunnable>
#include <QFileInfo>

#include "messagedeliver.h"

class QStandardItem;
class MessageDeliver;
class QMutex;

class ParallelSearcher : public QRunnable
{

public:
	ParallelSearcher(MessageDeliver *msgDeliver);
	~ParallelSearcher();

	virtual void run();

	void setSearchFile(
		const QString &filePath, 
		const QString &searchPatten, 
		bool isCaseSensitive, 
		bool &control, const 
		QString &encoding = "ANSI" /* Useless so far, for user input encoding. */);

private:
	QString m_strFilePath;
	QString m_strSearchPattern;
	MessageDeliver *m_pMessageDeliver;
	bool *m_pIsStop;
	bool m_isCase;
};

#endif // PARALLELSEARCHER_H
